<?php
/***************************************************************************
 *   copyright : (C) 2009 Udrea Cristian
 *   site : http://code.google.com/p/testauction-php
 ***************************************************************************/

/***************************************************************************
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU Lesser General Public License as 
 *   published by the Free Software Foundation; either version 2 of the
 *   License, or (at your option) any later version. Although none of the
 *   code may be sold. If you have been sold this script, get a refund.
 ***************************************************************************/
$self = APP_ROOT.'admin/index.php';
?>
<html>
<head>
<title><?php echo $pageTitle; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="<?php echo APP_ROOT;?>admin/include/admin.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../library/common.js"></script>
<?php
$n = count($script);
for ($i = 0; $i < $n; $i++) {
	if ($script[$i] != '') {
		echo '<script type="text/javascript" src="../library/'.$script[$i].'"></script>';
	}
}
?>
</head>
<body>
<table width="750" border="0" align="center" cellpadding="0" cellspacing="1" class="graybox">
  <tr>
    <td colspan="2"><img src="<?php echo APP_ROOT;?>admin/include/banner-top.gif" width="750" height="75"></td>
  </tr>
  <tr>
  <?if($session->logged_in && $session->isAdmin()) { ?>
    <td width="150" valign="top" class="navArea">
		<p>&nbsp;</p>
		<a href="<?php echo APP_ROOT; ?>admin/" class="leftnav">Pagina principala</a> 
		<a href="<?php echo APP_ROOT; ?>admin/product/" class="leftnav">Produse</a> 
		<a href="<?php echo APP_ROOT; ?>admin/auction/?view=open" class="leftnav">Licitatii Deschise</a> 
		<a href="<?php echo APP_ROOT; ?>admin/auction/?view=closed" class="leftnav">Licitatii Inchise</a> 
		<a href="<?php echo APP_ROOT; ?>admin/order/" class="leftnav">Livrari</a> 
		<a href="<?php echo APP_ROOT; ?>admin/user/" class="leftnav">Utilizatori</a> 
		<a href="<?php echo APP_ROOT; ?>admin/payment/" class="leftnav">Tranzactii</a>
		<a href="<?php echo APP_ROOT; ?>admin/config/" class="leftnav">Configurare</a> 
		<a href="<?php echo $self; ?>?logout" class="leftnav">Logout</a>
		<p>&nbsp;</p>
		<p>&nbsp;</p>
		<p>&nbsp;</p>
		<p>&nbsp;</p>
	</td>
   <?php } ?>
    <td width="600" valign="top" class="contentArea"><table width="100%" border="0" cellspacing="0" cellpadding="20">
        <tr>
          <td>
<?php
require_once $content;
?>
          </td>
        </tr>
      </table></td>
  </tr>
</table>
<p>&nbsp;</p>
<p align="center">Based on the PlainCart admin module <a href="http://www.phpwebcommerce.com">www.phpwebcommerce.com</a> Copyright &copy; 2005 - <?php echo date('Y'); ?></p>
</body>
</html>
